﻿using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Windows;
namespace CoreModule
{
    /// <summary>
    /// 测量数据
    /// </summary>

    [Index("RefTime", "StartTime", AllDescending =true)]
    [Index("DeviceSN", AllDescending = true)]
    public class MeasurementResultInfo
    {
        /// <summary>
        /// 默认主键
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Key]
        public long Id { get; set; }

        [StringLength(100)]
        public string DeviceSN { set; get; } = string.Empty;
         
        /// <summary>
        /// 
        /// </summary>
        public DateTime StartTime { set; get; }

        /// <summary>
        /// 
        /// </summary>
        public float StartWeight { set; get; }

        [StringLength(200)]
        public string StartClientId { get; set; }

      /// <summary>
      /// 
      /// </summary>
        public DateTime? EndTime { set; get; }

        [StringLength(100)]
        public float? EndWeight { set; get; }

        [StringLength(200)]
        public string EndClientId { get; set; } = string.Empty;

        /// <summary>
        /// 测量
        /// </summary>
        [StringLength(100)]
        public string VaporInterval { set; get; } = string.Empty;
        /// <summary>
        /// 雾化率
        /// </summary>
        /// 
        [StringLength(100)]
        public string Vapor { set; get; } = string.Empty;
        /// <summary>
        /// 
        /// </summary>
        public DateTime RefTime { set; get; }
        [StringLength(100)]
        public string VaporResult { set; get; } = string.Empty;
       
        /// <summary>
        /// 
        /// </summary>
        public long MeasurementArgId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [ForeignKey("MeasurementArgId")]
        public MeasurementArg MeasurementArg { get; set; }
 
         
    }
}
